{extends file="./main.tpl"}
{block name=head}
<style rel="stylesheet">
  table tr th {
    font-size : 1.3em;
  }
  
  table tr td {
    font-size: 1em;
  }
  
  .even
  {
    background-color:#BEE1FF;
    font-size:1em;
  }
  .odd
  {
    font-size:1em;
  }
</style>
{/block}
{block name=body}
<div class="header">
   <div style="float:left;">
     <span class="god" valign="top"><img src="./images/jayganesha.jpg" width="250px" height="40px" /></span>
   </div>
   <div style="float:left; margin-left:350px;">
     <img src="./images/shree.jpg" width="100px" height="50px" /> 
   </div>
   <div class="mataji" align="right">
     <span class="god" valign="top"><img src="./images/jaymataji.jpg" width="250px" height="40px" /></span><br /><br /><br />
   </div>
</div>
<br /><br /><br /><br /><br />
<center><h1 style="font-size:20px;">Rojmel</h1></center>
<form name="dateForm" action="rojmel.php" method="post">
  <table class="loanFont" align="center">
    <tr>
      <th valign="bottom" align="right" align="right"> Date : &nbsp</th>
      <td valign="bottom">{html_select_date prefix='curDate' field_order="DmY" month_format="%m" start_year='-5' end_year='+5' time=$today|date_format:"%d-%m-%Y"}</td>
      <td>&nbsp </td>
      <td valign="bottom"><input type="submit" name="submitDate" value="Submit"></td>
    </tr>
  </table>
</form><br/>
<table align="center">
  <tr>
    <td>
    	<table border="4" cellpadding="4" cellspacing="1" align="center">
    	  <tr>
    	    <td align="center" colspan="5"><font size="4px"><b>Credit</b></font></td>
    	  </tr>
        <tr style="background-color:#f2b844; border:3px;">
          <th>Date</th>
          <th>Account</th>
          <th>Loan No.</th>
          <th>Note</th>
          <th>Amount</th>
        </tr>
        {section name=rec loop=$rojmelArryCr}
          <tr class="{cycle values="odd,even"}">
            <td nowrap align="center">{$rojmelArryCr[rec]['date']}</td>
            <td align="center">{if $rojmelArryCr[rec]['accountName'] == 'shivshakti'}balance{else}{$rojmelArryCr[rec]['accountName']}{/if}</td>
            <td align="center">{$rojmelArryCr[rec]['loanId']}</td>
            <td align="center">{$rojmelArryCr[rec]['note']}</td>
            <td align="right">{$rojmelArryCr[rec]['amount']}</td>
          </tr>
        {/section}
        <tr>
          <th colspan="4" align="right">Credit Total</th>
          <th align="right">{$totalAmountCr}</th>
        </tr>
      </table>
    </td>
    <td>
      <table border="4" cellpadding="4" cellspacing="1" align="center">
        <tr>
          <td align="center" colspan="5"><font size="4px"><b>Debit</b></font></td>
        </tr>
        <tr style="background-color:#f2b844; border:3px;">
          <th>Date</th>
          <th>Account</th>
          <th>Loan No.</th>
          <th>Note</th>
          <th>Amount</th>
        </tr>
        {section name=rec loop=$rojmelArryDr}
          <tr class="{cycle values="odd,even"}">
            <td nowrap align="center">{$rojmelArryDr[rec]['date']}</td>
            <td align="center">{if $rojmelArryDr[rec]['accountName'] == 'shivshakti'}balance{else}{$rojmelArryDr[rec]['accountName']}{/if}</td>
            <td align="center">{$rojmelArryDr[rec]['loanId']}</td>
            <td align="center">{$rojmelArryDr[rec]['note']}</td>
            <td align="right">{$rojmelArryDr[rec]['amount']}</td>
          </tr>
        {/section}
        <tr>
          <th colspan="4" align="right"> Debit Total</th>
          <th align="right">{$totalAmountDr}</th>
        </tr>
      </table>
    </td>
  </tr>
  <tr><td>&nbsp</td></tr>
	 <tr>
     <th colspan="2" align="center"><font size="4px"><i> Final Amount : {$totalAmountCr-$totalAmountDr}</i></font></th>
   </tr>
</table>
  
{/block}